<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>库存表</title>
<script type="text/javascript" src="js/jquery-easyui-1.5.4.2/jquery.min.js"></script>
<script type="text/javascript" src="js/jquery-easyui-1.5.4.2/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript" src="js/jquery-easyui-1.5.4.2/jquery.easyui.min.js"></script>
<link rel="stylesheet" type="text/css" href="js/jquery-easyui-1.5.4.2/themes/icon.css"/>
<link rel="stylesheet" type="text/css" href="js/jquery-easyui-1.5.4.2/themes/black/easyui.css"/>
</head>
<body>
<script type="text/javascript">
$(function(){
	$("#pro_btn_ch").linkbutton({
		onClick:function(){
			var row=$("#fg").datagrid("getSelections");
			if(row!=""){
	
			$("#hg").datagrid({pageNumber:1, url:'get_all_inves_page_where'});
			$("#hg").datagrid('reload',{key:row[0].inveId});
			$("#io").window("open");
			
		}else{
		$.messager.alert('警告','请选择行');
	}}
	})
})
</script>
<table id="fg" class="easyui-datagrid" 
	data-options="fit:true,toolbar:'#db',url:'get_all_inves_page',method:'get',border:false,title:'库存信息',fitColumns:true,pagination:true,singleSelect:true">
		<thead>
			<tr>
				<th  data-options="field:'bbb',width:1,checkbox:true"></th>
				<th id="nij" data-options="field:'inveId',width:35" >编号</th>
				<th id="nik" data-options="field:'inveName',width:120">产品名称</th>
		     	<th id="nil" data-options="field:'proinfosta',width:100">产品型号</th>
				<th id="nio" data-options="field:'inveProNumb',width:100">数量</th>
			
			</tr>
		</thead>

	</table>



	<div id="db">
		<a id="pro_btn_ch"  class="easyui-linkbutton"
			data-options="iconCls:'icon-chazhao',plain:true" >查看流水明细</a> 
			
	</div>


		
		
		
<div id="io" class="easyui-window" title="产品流水明细"
				style="width: 600px; height: 500px"
				data-options="iconCls:'icon-save',modal:true,resizable:false,closed:true">
       <table id="hg" class="easyui-datagrid" 
	data-options="fit:true,border:false,url:'get_all_inves_page_where1',method:'get',pagination:true,singleSelect:true">
	<thead>
			<tr>
				
				<th id="nia" data-options="field:'inveInfoId',width:35" >编号</th>
				<th id="nib" data-options="field:'invetype',width:100,formatter:function(value,row,index){
				if(value==1){
				return '入库'
				}else{
				return '出库'
				}}">出入库类型</th>
		     	<th id="nic" data-options="field:'warehouse',width:100">仓库</th>
		     	<th id="nid" data-options="field:'inveinfodotime',width:200">操作时间</th>
		     	<th id="nif" data-options="field:'inveinfodoName',width:80">操作人</th>
			   	<th id="nit" data-options="field:'inveinfonumb',width:70">操作数量</th>
			</tr>
		</thead>


</table>
</div>
</body>
</html>